package com.java.base.exercise.jvm;

/**
 * @Author RenPu
 * @Date 2021/11/17 15:52
 * @Version 1.0
 * @Description: 模拟虚拟机栈内存溢出OOM
 *
 * -XX:ThreadStackSize=1m
 **/
public class JVMStackOOM {

    public static long counter=0;

    public static void main(String[] args) {
     work();
    }

    private static void work() {
        System.out.println("目前是第"+(++counter)+"次调用方法.....");
        work();
    }


}
